<?php

	include("dboper.php");

    if(!@$_POST['akses'] == true) {
	   die('Akses langsung tidak diperbolehkan!');
	}

	$d_sistem = getConfig();	

    

	$h_asisten = getAllAsisten();
$a=0;
$data_asisten;
$listidasisten='';
while ($d_asisten = mysql_fetch_array($h_asisten)) {
	$data_asisten[$a]['nim_asisten']=$d_asisten['nim_asisten'];
	$data_asisten[$a]['nama_asisten']=$d_asisten['nama_asisten'];
	$data_asisten[$a]['nim_asisten']=$d_asisten['nim_asisten'];
	$data_asisten[$a]['id_asisten']=$d_asisten['id_asisten'];
	$a++;
	
}

echo '<form id="doubleMethodForm" onSubmit="return false;"><p>Silahkan berikan penilaian beserta pesan terhadap asisten praktikum anda dibawah ini.</p>';
            echo '<table > 
					<tr style="text-align:center;">
						<td width="125px" colspan="4"><b></b></td>
						<td width="125px" colspan="16" ><b> Penilaian Asisten Praktikum</b></td>
					</tr>
					<tr><td width="125px" colspan="4"></td>';
					$a=0;
					while ($a<sizeof($data_asisten)) {
					
            echo '
                        <td width="125px" colspan="4" align="center"><h6><b>'.$data_asisten[$a]['nama_asisten'].'</b></h6>'.$data_asisten[$a]['nim_asisten'].'</td>
                  ';
				  $a++;
            }
					
					echo '</tr>                 
                    <tr style="text-align:center;" >
                        <td width="125px" colspan="4"><b>Aspek Penilaian</b></td>';
						$a=0;
                      while ($a<sizeof($data_asisten)) {
            echo '<td><b>A</b></td><td><b>B</b></td><td><b>C</b></td><td><b>D</b></td>';
       			$a++;
			}
				
				   echo '    
                    </tr>
					<tr style="text-align:center;" >
                        <td width="125px" colspan="4">Penguasaan Materi</td>';
						
						$a=0;
		  while ($a<sizeof($data_asisten)) {
						echo '
						<td id="tbgrupMateri"><input required="" type="radio" name="grupMateri'.$data_asisten[$a]['id_asisten'].'" id="grupMateri" value="4"    
                        alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td id="tbgrupMateri"><input required="" type="radio" name="grupMateri'.$data_asisten[$a]['id_asisten'].'" id="grupMateri" 			value="3" alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td id="tbgrupMateri"><input required="" type="radio" name="grupMateri'.$data_asisten[$a]['id_asisten'].'" id="grupMateri" value="2" alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td id="tbgrupMateri"><input required="" type="radio" name="grupMateri'.$data_asisten[$a]['id_asisten'].'" id="grupMateri" value="1" alt="'.$data_asisten[$a]['id_asisten'].'" /></td>';
						$a++;
						}
						echo '
                    </tr>
					<tr style="text-align:center;" >
                        <td width="125px" colspan="4">Membimbing Praktikan</td>';
						
						$a=0;
                      while ($a<sizeof($data_asisten)) {
					  echo '<td><input required="" type="radio" name="grupSuasana'.$data_asisten[$a]['id_asisten'].'" id="grupSuasana" value="4"    
                        alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td><input required="" type="radio" name="grupSuasana'.$data_asisten[$a]['id_asisten'].'" id="grupSuasana" value="3" alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td><input required="" type="radio" name="grupSuasana'.$data_asisten[$a]['id_asisten'].'" id="grupSuasana" value="2" alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td><input required="" type="radio" name="grupSuasana'.$data_asisten[$a]['id_asisten'].'" id="grupSuasana" value="1" alt="'.$data_asisten[$a]['id_asisten'].'" /></td>';
						$a++;
						}
						echo '
                    </tr>
					<tr style="text-align:center;" >
                        <td width="125px" colspan="4">Public Speaking</td>';
						$a=0;
                      while ($a<sizeof($data_asisten)) {
						echo '<td id="tbgrupBerbicara"><input required="" type="radio" name="grupBerbicara'.$data_asisten[$a]['id_asisten'].'" id="grupBerbicara" value="4"    
                        alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td id="tbgrupBerbicara"><input required="" type="radio" name="grupBerbicara'.$data_asisten[$a]['id_asisten'].'" id="grupBerbicara" value="3" alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td id="tbgrupBerbicara"><input required="" type="radio" name="grupBerbicara'.$data_asisten[$a]['id_asisten'].'" id="grupBerbicara" value="2" alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td id="tbgrupBerbicara"><input required="" type="radio" name="grupBerbicara'.$data_asisten[$a]['id_asisten'].'" id="grupBerbicara" value="1" alt="'.$data_asisten[$a]['id_asisten'].'" /></td>';
						$a++;
						}
						
                    echo '</tr>
					<tr style="text-align:center;" >
                        <td width="125px" colspan="4">Kedisiplinan</td>';
						$a=0;
                      while ($a<sizeof($data_asisten)) {
						echo '<td><input required="" type="radio" name="grupDisiplin'.$data_asisten[$a]['id_asisten'].'" id="grupDisiplin" value="4"    
                        alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td><input required="" type="radio" name="grupDisiplin'.$data_asisten[$a]['id_asisten'].'" id="grupDisiplin" value="3" alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td><input required="" type="radio" name="grupDisiplin'.$data_asisten[$a]['id_asisten'].'" id="grupDisiplin" value="2" alt="'.$data_asisten[$a]['id_asisten'].'" /></td><td><input required="" type="radio" name="grupDisiplin'.$data_asisten[$a]['id_asisten'].'" id="grupDisiplin" value="1" alt="'.$data_asisten[$a]['id_asisten'].'" /></td>';
						$a++;
						}
						
                    echo '</tr>
					 </tr>
					<tr style="text-align:center;" ><td width="125px" colspan="4">Pesan</td>';
					$a=0;
                      while ($a<sizeof($data_asisten)) {
					  $listidasisten.="".$data_asisten[$a]['id_asisten'];
						if($a!=sizeof($data_asisten)-1){
							$listidasisten.=",";
						}
					echo'<td width="125px" colspan="4"><div style="padding:5px;float:left;"> <textarea id="txtPesan'.$a.'" name="txtPesan'.$data_asisten[$a]['id_asisten'].'"></textarea></div></td>';
						 $a++;
						}
						 echo '</tr></table>
			<input type="hidden" name="listidasisten" value="'.$listidasisten.'"/>			 
			<input type="hidden" name="japrak" value="'.$d_sistem['japrak'].'" />
			<input type="hidden" id="jml" name="jml" value="'.sizeof($data_asisten).'"/>
            <input type="hidden" value="true" name="akses" />
            <input type="hidden" value="'.$idTmp.'" name="listid_asisten" />
            <input type="hidden" value="'.$d_sistem['matakuliah'].'" name="matakuliah" />
            <input type="hidden" value="'.$d_sistem['kelas'].'" name="kelas" /><hr>
            <hr><div class="fb_footer"> <input type="submit" value="Selanjutnya" /></div></form>';

?>
<script type="text/javascript" charset="utf-8">
    $("a[rel^='prettyPhoto']").prettyPhoto({social_tools:false});
</script>

<script type="text/javascript" src="modules/system.js"></script>